﻿<!--
<copyright file="OpenFileDialog .xaml.cs" company="Microsoft">
//  Copyright (c) Microsoft Corporation.  All rights reserved.
</copyright>
<summary>
// Open file dialogue will allow the user to select files containing DNA\Protein sequences.
// The file types that are supported by the Bio can
// be retrieved by querying Framework Abstraction classes.
</summary>
-->
<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="SequenceAssembler.OpenFileDialog"	
	Title="{DynamicResource SequenceAssembly_SequenceAssembler}" SizeToContent="Height" Height="Auto" Width="415" MinHeight="280" MinWidth="415" WindowStyle="SingleBorderWindow" ShowInTaskbar="False" WindowStartupLocation="CenterScreen" VerticalAlignment="Center" HorizontalAlignment="Center" xmlns:SequenceAssembler="clr-namespace:SequenceAssembler" Icon="/SequenceAssembler;component/Resources/SequenceAssembler.ico" ResizeMode="NoResize">

    <Border Padding="10,5,5,5" Style="{DynamicResource BorderStyle}">
        <Grid>
            <!-- Open file dialogue will allow the user to select files
            containing DNA\Protein sequences.-->
            <StackPanel>
                <TextBlock Text="{DynamicResource SequenceFileBrowser}" TextWrapping="Wrap" FontSize="18"/>
                <TextBlock Text="{DynamicResource SequenceFileBrowserText}" TextWrapping="Wrap"/>
                <TextBlock Text="{DynamicResource SequenceFileText}" TextWrapping="Wrap" Margin="0,10,0,0"/>
                <Grid MinHeight="72" MaxHeight="175">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Button Grid.Column="1" ToolTipService.ShowOnDisabled="True" x:Name="btnBrowse" ToolTip="{DynamicResource SequenceFileBrowsetooltip}" Content="{DynamicResource SequenceFileBrowseText}" Height="25" Margin="3,47,0,0" IsEnabled="True" Style="{DynamicResource WebServiceButton}"/>
                    <ListView x:Name="fileNameList" IsTabStop="False" ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                        <ListView.Resources>
                            <Style TargetType="ListViewItem">
                                <Setter Property="ContentTemplate">
                                    <Setter.Value>
                                        <DataTemplate>
                                            <Grid HorizontalAlignment="Stretch" Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}">
                                                <TextBlock Text="{TemplateBinding Content}" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" />
                                            </Grid>
                                        </DataTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </ListView.Resources>
                    </ListView>
                </Grid>

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <TextBlock Grid.Column="0" Grid.Row="0" Text="{DynamicResource AssemblerPane_Molecule_Type}" TextWrapping="Wrap" Margin="0,10,0,0"/>
                    <ComboBox Grid.Column="0" Grid.Row="1" x:Name="comboMoleculeType" IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Left" Width="125" IsEnabled="False" />

                    <TextBlock Grid.Column="1" Grid.Row="0" Text="{DynamicResource AssemblerPane_ParserType}" TextWrapping="Wrap" Margin="0,10,0,0"/>
                    <ComboBox Grid.Column="1" Grid.Row="1" x:Name="cmbParserType" IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Left" Width="125" IsEnabled="False" />
                </Grid>
                <Path Stretch="Fill" Stroke="#FF809EB7" Height="1" Data="M12,189 L248.10379,189" Margin="0,12,0,0"/>
                <StackPanel x:Name="animationPanel" Visibility="Collapsed" Orientation="Horizontal" Margin="0,4,0,4">
                    <SequenceAssembler:ProgressAnimation/>
                    <StackPanel Margin="5,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
                        <TextBlock Foreground="#FF4D4D4D" TextWrapping="Wrap" FontWeight="Bold" FontSize="14"><Run Text="Importing Files."/><LineBreak/><Run FontSize="12" FontWeight="Normal" Text="This could take a while. Please wait."/></TextBlock>
                        <Button x:Name="btnImportCancel" HorizontalAlignment="Left" Margin="10,0,0,0" Style="{DynamicResource WebServiceButton}" VerticalAlignment="Center" Content="{DynamicResource SequenceFileCancel}" FontSize="12" FontWeight="Normal" />
                    </StackPanel>
                </StackPanel>
                <StackPanel x:Name="buttonPanel" Orientation="Horizontal" Margin="0,5,0,0" Visibility="Visible">
                    <Button ToolTipService.ShowOnDisabled="True" ToolTip="{DynamicResource SequenceImportTooltip}" Content="{DynamicResource SequenceImportFile}" x:Name="btnImport" IsEnabled="False" Visibility="Visible" Style="{DynamicResource WebServiceButton}" IsDefault="True"/>
                    <Button x:Name="btnCancel" Content="{DynamicResource SequenceFileCancel}" Margin="3,0,0,0" Style="{DynamicResource WebServiceButton}" />
                </StackPanel>
            </StackPanel>
        </Grid>
    </Border>
</Window>